package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.dto.OrdersConfirmDTO;
import com.sky.dto.OrdersPageQueryDTO;
import com.sky.entity.Orders;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface OrderAdminMapper {

    /**
     * 分页查询订单数据
     * @param dto
     * @return
     */
    Page<Orders> page(OrdersPageQueryDTO dto);

    /**
     * 查询所有订单状态
     */
    @Select("select status from orders")
    List<Integer> statusList();

    /**
     * 根据id查询订单
     * @param id
     * @return
     */
    @Select("select * from orders where id = #{id}")
    Orders selectById(Long id);



    /**
     * 修改订单信息
     * @param orders
     */
    void update(Orders orders);
}
